<?php /* Smarty version 2.6.19, created on 2009-01-02 12:18:01
         compiled from admin/admin_troop.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'admin/admin_troop.tpl', 447, false),array('function', 'math', 'admin/admin_troop.tpl', 626, false),)), $this); ?>
<?php if ($this->_tpl_vars['action'] == ""): ?>
<?php echo '
<script type="text/javascript">
<!--
function confirmDelete(articleId) {
if (confirm("This will delete this member. Continue?"))
document.location = "admin.php?page=troop&action=delete&id=" + articleId;
}
//-->
</script>
'; ?>

<h2><?php echo $this->_tpl_vars['scoutlang']['members']; ?>
</h2>
<?php if ($this->_tpl_vars['addallowed']): ?><div class="toplinks"><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=new" title="New <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/add.png" alt="New <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
" border="0" /></a>
</div><?php endif; ?>
<?php if ($this->_tpl_vars['nummembers'] > 0): ?>
<div style="text-align:center">Parent in <span style="font-weight:bold;color:#ff0000;">red</span> is the primary guardian.</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="table sortable-onload-2 rowstyle-alt paginate-15" id="sortTable">
<thead>
<tr> 
  <th width="120px" class="smallhead"></th>
  <th class="smallhead sortable">Last Name</th>
  <th width="12%" class="smallhead sortable">First Name</th>
  <th width="10%" class="smallhead sortable">Username</th>
  <th width="15%" class="smallhead sortable">Relations</th>
  <th width="10%" class="smallhead sortable">Home</th>
  <th width="10%" class="smallhead sortable">Cellphone</th>
</tr>
</thead>
<tbody>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['nummembers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<tr class="text">
  <td class="text"><div align="center"><?php if ($this->_tpl_vars['editallowed'] && ! $this->_tpl_vars['limitgroup']): ?><a href="admin.php?page=troop&amp;action=edit&amp;id=<?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['id']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/edit.gif" alt="Edit <?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
's details" title="Edit <?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
's details" border="0" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/edit_grey.gif" alt="Edit disabled" title="Edit disabled" border="0" /><?php endif; ?>&nbsp;&nbsp;<a href="admin.php?page=troop&amp;action=view&amp;id=<?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['id']; ?>
" ><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/page.gif" alt="View <?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
's Details" title="View <?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
's Details" border="0"/></a>&nbsp;&nbsp;<?php if ($this->_tpl_vars['members'][$this->_sections['users']['index']]['type'] == 0 && $this->_tpl_vars['members'][$this->_sections['users']['index']]['awardScheme'] != 0): ?><a href="admin.php?page=troop&amp;subpage=records&amp;id=<?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['id']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/record.png" alt="<?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
's Record" title="<?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
's Record" border="0" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/record_grey.png" alt="Not a <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
" title="Not a <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
" border="0" /><?php endif; ?>&nbsp;&nbsp;<?php if ($this->_tpl_vars['deleteallowed']): ?><a href="javascript:confirmDelete('<?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['id']; ?>
')"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete.gif"  border="0" alt="Delete <?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
" title="Delete <?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete_grey.gif"  border="0" alt="Delete disabled" title="Delete disabled" /><?php endif; ?>
</div></td>
  <td class="text"><?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['lastName']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['firstName']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['uname']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['relations']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['home']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['members'][$this->_sections['users']['index']]['cell']; ?>
</td>
</tr>
<?php endfor; endif; ?>
</tbody>
</table>
<?php else: ?>
<div align="center">No <?php echo $this->_tpl_vars['scoutlang']['members']; ?>
</div>
<?php endif; ?>
<?php if ($this->_tpl_vars['addallowed']): ?><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=import">Import CSV file</a><?php endif; ?>
<?php elseif ($this->_tpl_vars['action'] == 'import'): ?>
<h2>Import from CSV</h2>
 <?php if ($this->_tpl_vars['step'] == 1): ?>
 <div align="center">
 <form action="" method="post" enctype="multipart/form-data" name="form1">
 <p>The CSV (Comma Seperated Values) file must have fields that are seperated by commas, fields should be deliminated with "" (double quotation marks).</p>
 <p>The minimum information required is:</p>
 <ul>
 <li>First Name</li>
 <li>Last Name</li>
 </ul>
 <p>You can added parent information at the same time. Parent information must be in the same row as the member information.</p>
  <fieldset class="formlist">
  <legend>Upload CSV file to import</legend>
  <div class="field">
  <label for="file" class="label">File<span class="hintanchor" title="Select a csv file on your computer that you wish to import."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
    <div class="inputboxwrapper"><input name="file" id="file" type="file" size="50" class="inputbox" /></div><br />
  </div>
        <div class="submitWrapper">
    <input type="submit" name="Submit" value="Submit" class="button" />
		<input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="history.go(-1);" class="button" />
   </div>
  </fieldset>
  </form>
  </div>
  <?php elseif ($this->_tpl_vars['step'] == 2): ?>
 <div align="center">
 <form action="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=import&amp;step=2" method="post" name="form1">
   <div class="field">
  <fieldset>
  <legend>Select which fields to import</legend>
      <?php echo '
<script type="text/javascript">
function memberSelect()
{
    var index = document.getElementById(\'type\').selectedIndex;
    var type = document.getElementById(\'type\').options[index].value;
    
    if (type == 0)
    {
        document.getElementById(\'memberDiv\').style.display = \'block\';
        document.getElementById(\'scoutinginfo\').style.display = \'block\';
    }
    else
    {
        document.getElementById(\'memberDiv\').style.display = \'none\';        
        document.getElementById(\'scoutinginfo\').style.display = \'none\';
    }
}
</script>
'; ?>

<div class="fieldItem"><label for="type" class="label">Record Type<span class="hintanchor" title="Type of records you are importing"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="type" name="type" class="inputbox" onchange="memberSelect();">
<option value="0" <?php if ($this->_tpl_vars['member']['type'] == 0): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['scoutlang']['member']; ?>
</option>
<option value="1" <?php if ($this->_tpl_vars['member']['type'] == 1): ?>selected="selected"<?php endif; ?>>Father</option>
<option value="2" <?php if ($this->_tpl_vars['member']['type'] == 2): ?>selected="selected"<?php endif; ?>>Mother</option>
</select></div></div><br />

    <div class="fieldItem"><label for="firstname" class="label">First Name<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="firstname" id="firstname"><option value="-1">None</option><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="middlename" class="label">Middle Name<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="middlename" id="middlename"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="lastname" class="label">Last Name<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="lastname" id="lastname"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="sex" class="label">Gender<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="sex" id="sex"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="address" class="label">Address<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="address" id="address"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select class="inputbox" name="address1" id="address1"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select class="inputbox" name="address2" id="address2"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select class="inputbox" name="address3" id="address3"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="homenumber" class="label">Home Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="homenumber" id="homenumber"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="cellnumber" class="label">Cell Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="cellnumber" id="cellnumber"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="worknumber" class="label">Work Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="worknumber" id="worknumber"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="email" class="label">Email Address<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="email" id="email"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="dob" class="label">Date of Birth<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="dob" id="dob"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="medicalname" class="label">Medical Aid Name<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="medicalname" id="medicalname"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="medicalnumber" class="label">Medical Aid Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="medicalnumber" id="medicalnumber"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="docname" class="label">Doctor's Name<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="docname" id="docname"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="docnum" class="label">Doctor Tel Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select class="inputbox" name="docnum" id="docnum"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />

<div class="fieldItem"><label for="medical" class="label">Medical Conditions<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper">    <select  class="inputbox"name="medical" id="medical"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
    </fieldset>
<div id="memberDiv" <?php if ($this->_tpl_vars['member']['type'] != 0): ?>style="display:none;"<?php else: ?>style="display:block;"<?php endif; ?>>    
    <fieldset>
    <legend>Parent Information</legend>
    
<div class="fieldItem"><label for="primaryGuard" class="label">Primary Guardian<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="primaryGuard" name="primaryGuard" class="inputbox" >
<option value="0" <?php if ($this->_tpl_vars['member']['primaryGuard'] == 0): ?>selected="selected"<?php endif; ?>>Father</option>
<option value="1" <?php if ($this->_tpl_vars['member']['primaryGuard'] == 1): ?>selected="selected"<?php endif; ?>>Mother</option>
</select></div></div><br />

<fieldset class="formlist">
<legend>Father</legend>
<div class="fieldItem"><label for="fatherFirst" class="label">First Name<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="fatherFirst" id="fatherFirst"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="fatherLast" class="label">Last Name<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="fatherLast" id="fatherLast"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="fatherAddress" class="label">Address<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox" name="fatherAddress" id="fatherAddress"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select  class="inputbox" name="fatherAddress2" id="fatherAddress2"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select  class="inputbox" name="fatherAddress3" id="fatherAddress3"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select  class="inputbox" name="fatherAddress4" id="fatherAddress4"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="fatherHome" class="label">Home Number<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="fatherHome" id="fatherHome"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="fatherCell" class="label">Cell Number<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="fatherCell" id="fatherCell"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="fatherWork" class="label">Work Number<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="fatherWork" id="fatherWork"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="fatherEmail" class="label">Email Address<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="fatherEmail" id="fatherEmail"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
</fieldset>

<fieldset class="formlist">
<legend>Mother</legend>
<div class="fieldItem"><label for="motherFirst" class="label">First Name<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="motherFirst" id="motherFirst"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="motherLast" class="label">Last Name<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="motherLast" id="motherLast"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="motherAddress" class="label">Address<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox" name="motherAddress" id="motherAddress"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select  class="inputbox" name="motherAddress2" id="motherAddress2"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select  class="inputbox" name="motherAddress3" id="motherAddress3"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select><select  class="inputbox" name="motherAddress4" id="motherAddress4"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="motherHome" class="label">Home Number<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="motherHome" id="motherHome"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="motherCell" class="label">Cell Number<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="motherCell" id="motherCell"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="motherWork" class="label">Work Number<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="motherWork" id="motherWork"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
<div class="fieldItem"><label for="motherEmail" class="label">Email Address<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="motherEmail" id="motherEmail"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
</fieldset>
	</fieldset>
	</div>
	
<div id="scoutinginfo" <?php if ($this->_tpl_vars['member']['type'] != 0): ?>style="display:none;"<?php else: ?>style="display:block;"<?php endif; ?>>
<fieldset>
<legend>Scouting Information</legend>
<div class="fieldItem"><label for="section" class="label">Section<span class="hintanchor" title="Required :: Which section do these <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
(s) belong to"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="section" name="section" class="inputbox">
<option value="0">None</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numsections']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['sections'][$this->_sections['users']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['sections'][$this->_sections['users']['index']]['name']; ?>
</option>
<?php endfor; endif; ?>
</select></div></div><br />

<div class="fieldItem"><label for="patrol" class="label"><?php echo $this->_tpl_vars['scoutlang']['patrol']; ?>
<span class="hintanchor" title="Required :: Field which contains the <?php echo $this->_tpl_vars['scoutlang']['patrol']; ?>
 information?"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select  class="inputbox"name="patrol" id="patrol"><option value="-1">None</option>
    <?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <option value="<?php echo $this->_sections['header']['index']; ?>
"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</option>
  <?php endfor; endif; ?>
    </select></div></div><br />
    
<div class="fieldItem"><label for="awardScheme" class="label"><?php echo $this->_tpl_vars['scoutlang']['award_scheme']; ?>
<span class="hintanchor" title="Required :: Which <?php echo $this->_tpl_vars['scoutlang']['award_scheme']; ?>
 do these<?php echo $this->_tpl_vars['scoutlang']['member']; ?>
(s) follow?"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="awardScheme" name="awardScheme" class="inputbox">
<option value="0">None</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numschemes']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['schemes'][$this->_sections['users']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['schemes'][$this->_sections['users']['index']]['name']; ?>
</option>
<?php endfor; endif; ?>
</select></div></div><br />
</fieldset>
</div>
	
        <div class="submitWrapper">
    <input type="submit" name="Submit" value="Submit" class="button" />
		<input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="history.go(-1);" class="button" />
   </div>  </div>
  </form>

  
  
    <h3>Imported Data</h3>
  <div style="width:98%;overflow:auto;padding:5px;height:700px;">
 <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="table sortable-onload-1 rowstyle-alt paginate-7" id="sortTable">
 <thead>
<tr> 
<?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['headers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <th class="smallhead sortable"><?php echo $this->_tpl_vars['headers'][$this->_sections['header']['index']]; ?>
</th>
  <?php endfor; endif; ?>
</tr>
</thead>
<tbody>
<?php unset($this->_sections['csvdata']);
$this->_sections['csvdata']['name'] = 'csvdata';
$this->_sections['csvdata']['loop'] = is_array($_loop=$this->_tpl_vars['csvdata']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['csvdata']['show'] = true;
$this->_sections['csvdata']['max'] = $this->_sections['csvdata']['loop'];
$this->_sections['csvdata']['step'] = 1;
$this->_sections['csvdata']['start'] = $this->_sections['csvdata']['step'] > 0 ? 0 : $this->_sections['csvdata']['loop']-1;
if ($this->_sections['csvdata']['show']) {
    $this->_sections['csvdata']['total'] = $this->_sections['csvdata']['loop'];
    if ($this->_sections['csvdata']['total'] == 0)
        $this->_sections['csvdata']['show'] = false;
} else
    $this->_sections['csvdata']['total'] = 0;
if ($this->_sections['csvdata']['show']):

            for ($this->_sections['csvdata']['index'] = $this->_sections['csvdata']['start'], $this->_sections['csvdata']['iteration'] = 1;
                 $this->_sections['csvdata']['iteration'] <= $this->_sections['csvdata']['total'];
                 $this->_sections['csvdata']['index'] += $this->_sections['csvdata']['step'], $this->_sections['csvdata']['iteration']++):
$this->_sections['csvdata']['rownum'] = $this->_sections['csvdata']['iteration'];
$this->_sections['csvdata']['index_prev'] = $this->_sections['csvdata']['index'] - $this->_sections['csvdata']['step'];
$this->_sections['csvdata']['index_next'] = $this->_sections['csvdata']['index'] + $this->_sections['csvdata']['step'];
$this->_sections['csvdata']['first']      = ($this->_sections['csvdata']['iteration'] == 1);
$this->_sections['csvdata']['last']       = ($this->_sections['csvdata']['iteration'] == $this->_sections['csvdata']['total']);
?>
<tr class="text">
<?php unset($this->_sections['header']);
$this->_sections['header']['name'] = 'header';
$this->_sections['header']['loop'] = is_array($_loop=$this->_tpl_vars['csvdata'][$this->_sections['csvdata']['index']]) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['header']['show'] = true;
$this->_sections['header']['max'] = $this->_sections['header']['loop'];
$this->_sections['header']['step'] = 1;
$this->_sections['header']['start'] = $this->_sections['header']['step'] > 0 ? 0 : $this->_sections['header']['loop']-1;
if ($this->_sections['header']['show']) {
    $this->_sections['header']['total'] = $this->_sections['header']['loop'];
    if ($this->_sections['header']['total'] == 0)
        $this->_sections['header']['show'] = false;
} else
    $this->_sections['header']['total'] = 0;
if ($this->_sections['header']['show']):

            for ($this->_sections['header']['index'] = $this->_sections['header']['start'], $this->_sections['header']['iteration'] = 1;
                 $this->_sections['header']['iteration'] <= $this->_sections['header']['total'];
                 $this->_sections['header']['index'] += $this->_sections['header']['step'], $this->_sections['header']['iteration']++):
$this->_sections['header']['rownum'] = $this->_sections['header']['iteration'];
$this->_sections['header']['index_prev'] = $this->_sections['header']['index'] - $this->_sections['header']['step'];
$this->_sections['header']['index_next'] = $this->_sections['header']['index'] + $this->_sections['header']['step'];
$this->_sections['header']['first']      = ($this->_sections['header']['iteration'] == 1);
$this->_sections['header']['last']       = ($this->_sections['header']['iteration'] == $this->_sections['header']['total']);
?>
  <td class="text"><?php echo $this->_tpl_vars['csvdata'][$this->_sections['csvdata']['index']][$this->_sections['header']['index']]; ?>
</td>
  <?php endfor; endif; ?>
</tr>
<?php endfor; endif; ?>
</tbody>
 </table>
 </div>
 </div>
 <?php endif; ?>
<?php elseif ($this->_tpl_vars['action'] == 'new' || $this->_tpl_vars['action'] == 'edit'): ?>
<h2><?php if ($this->_tpl_vars['action'] == 'new'): ?>Add<?php else: ?>Edit<?php endif; ?> <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
</h2>
<div align="center"><div class="formlist">
<form name="form1" method="post" action="" onsubmit="return checkForm([['firstname','text',true,0,0,''],['lastname','text',true,0,0,''],['email','email',false,0,0,''],['dob', 'date', false,0,0,'']]);">
<div class="field">
<fieldset>
<legend>Details</legend>
<div class="fieldItem"><label for="firstname" class="label">First Name<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="firstname" name="firstname" class="inputbox" value="<?php echo $this->_tpl_vars['member']['firstName']; ?>
" onblur="checkElement('firstname', 'text', true, 0, 0, '');"><br /><span class="fieldError" id="firstnameError">Required</span></div></div><br />

<div class="fieldItem"><label for="middlename" class="label">Middle Name<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="middlename" name="middlename" class="inputbox" value="<?php echo $this->_tpl_vars['member']['middleName']; ?>
" /></div></div><br />

<div class="fieldItem"><label for="lastname" class="label">Last Name<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="lastname" name="lastname" class="inputbox" value="<?php echo $this->_tpl_vars['member']['lastName']; ?>
" onblur="checkElement('lastname', 'text', true, 0, 0, '');"><br /><span class="fieldError" id="lastnameError">Required</span></div></div><br />

<div class="fieldItem"><label for="sex" class="label">Gender<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="sex" name="sex" class="inputbox">
<option value="0" <?php if ($this->_tpl_vars['member']['sex'] == 0): ?>selected="selected"<?php endif; ?>>Male</option>
<option value="1" <?php if ($this->_tpl_vars['member']['sex'] == 1): ?>selected="selected"<?php endif; ?>>Female</option>
</select></div></div><br />

<div class="fieldItem"><label for="address" class="label">Address<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><textarea id="address" name="address" rows="10" class="inputbox"><?php echo $this->_tpl_vars['member']['address']; ?>
</textarea></div></div><br />
<div class="fieldItem"><label for="homenumber" class="label">Home Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="homenumber" name="homenumber" class="inputbox" value="<?php echo $this->_tpl_vars['member']['home']; ?>
"/></div></div><br />

<div class="fieldItem"><label for="cellnumber" class="label">Cell Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="cellnumber" name="cellnumber" class="inputbox" value="<?php echo $this->_tpl_vars['member']['cell']; ?>
" /></div></div><br />

<div class="fieldItem"><label for="worknumber" class="label">Work Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="worknumber" name="worknumber" class="inputbox" value="<?php echo $this->_tpl_vars['member']['work']; ?>
" /></div></div><br />

<div class="fieldItem"><label for="email" class="label">Email Address<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="email" name="email" class="inputbox" value="<?php echo $this->_tpl_vars['member']['email']; ?>
" onblur="checkElement('email', 'email', false, 0, 0, '');"><br /><span class="fieldError" id="emailError">Must be a valid email address.</span></div></div><br />

<div class="fieldItem"><label for="dob" class="label">Date of Birth<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="dob" name="dob" class="inputbox format-y-m-d highlight-days-67" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['member']['dob'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")); ?>
"  onblur="checkElement('dob', 'date', false, 0, 0, '');"><br /><span class="fieldError" id="dobError">Must be a valid date in the format of YYYY-MM-DD.</span></div></div><br />
</fieldset>

<fieldset>
<legend>Medical Details</legend>
<div class="fieldItem"><label for="medicalname" class="label">Medical Aid Name<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="medicalname" name="medicalname" class="inputbox" value="<?php echo $this->_tpl_vars['member']['aidName']; ?>
" /></div></div><br />

<div class="fieldItem"><label for="medicalnumber" class="label">Medical Aid Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="medicalnumber" name="medicalnumber" class="inputbox" value="<?php echo $this->_tpl_vars['member']['aidNumber']; ?>
" /></div></div><br />

<div class="fieldItem"><label for="docname" class="label">Doctor's Name<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="docname" name="docname" class="inputbox" value="<?php echo $this->_tpl_vars['member']['docName']; ?>
" /></div></div><br />

<div class="fieldItem"><label for="docnum" class="label">Doctor Tel Number<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input type="text" id="docnum" name="docnum" class="inputbox" value="<?php echo $this->_tpl_vars['member']['docNumber']; ?>
" /></div></div><br />

<div class="fieldItem"><label for="medical" class="label">Medical Conditions<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><textarea id="medical" name="medical" class="inputbox"><?php echo $this->_tpl_vars['member']['medicalDetails']; ?>
</textarea></div></div><br />
</fieldset>

<fieldset>
<legend>Other Information</legend>
<?php echo '
<script type="text/javascript">
function memberSelect()
{
    var index = document.getElementById(\'type\').selectedIndex;
    var type = document.getElementById(\'type\').options[index].value;
    
    if (type == 0)
    {
        document.getElementById(\'memberDiv\').style.display = \'block\';
        document.getElementById(\'scoutinginfo\').style.display = \'block\';
    }
    else
    {
        document.getElementById(\'memberDiv\').style.display = \'none\';        
        document.getElementById(\'scoutinginfo\').style.display = \'none\';
    }
}
</script>
'; ?>

<div class="fieldItem"><label for="type" class="label">Record Type<span class="hintanchor" title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="type" name="type" class="inputbox" onchange="memberSelect();">
<option value="0" <?php if ($this->_tpl_vars['member']['type'] == 0): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['scoutlang']['member']; ?>
</option>
<option value="1" <?php if ($this->_tpl_vars['member']['type'] == 1): ?>selected="selected"<?php endif; ?>>Father</option>
<option value="2" <?php if ($this->_tpl_vars['member']['type'] == 2): ?>selected="selected"<?php endif; ?>>Mother</option>
</select></div></div><br />

<?php echo '
<script type="text/javascript">
function selected()
{
    var users = [];
    var lastname = [];
    var firstname = [];
    '; ?>

    <?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numusers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<?php if ($this->_tpl_vars['user'][$this->_sections['users']['index']]['selected']): ?>users[<?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['id']; ?>
] = true;
    lastname[<?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['id']; ?>
] = '<?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['selectedlast']; ?>
';
    firstname[<?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['id']; ?>
] = '<?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['selectedfirst']; ?>
';
<?php endif; ?>
    <?php endfor; endif; ?>
    <?php echo '
    var index = document.getElementById(\'userId\').selectedIndex;
    var id = document.getElementById(\'userId\').options[index].value;
    if (users[id] == true)
    {
        document.getElementById(\'selected\').style.display = \'block\';
        document.getElementById(\'selected\').innerHTML = \'\';
        document.getElementById(\'selected\').innerHTML = \'User already in use by \' + lastname[id] + \', \' + firstname[id] + \'. Selecting this user will remove the username link for \' + lastname[id] + \', \' + firstname[id] + \'.\';
    }
    else
    {
        document.getElementById(\'selected\').style.display = \'none\';
    }
}

function fathercopy()
{
    var index = document.getElementById(\'fatherId\').selectedIndex;
    if (index != 0)
    {
        document.getElementById(\'copyfather\').style.display = \'block\';
    }
    else
    {
        document.getElementById(\'copyfather\').style.display = \'none\';
    }
}

function mothercopy()
{
    var index = document.getElementById(\'motherId\').selectedIndex;
    if (index != 0)
    {
        document.getElementById(\'copymother\').style.display = \'block\';
    }
    else
    {
        document.getElementById(\'copymother\').style.display = \'none\';
    }
}

function toggle(id, fromid)
{
    if (document.getElementById(fromid).checked)
    {
        document.getElementById(id).disabled = true;
        document.getElementById(id).checked = false;
    }
    else
    {
        document.getElementById(id).disabled = false;
    }
}
</script>
'; ?>

<div class="fieldItem"><label for="userId" class="label">Website Username<span class="hintanchor" title="Optional"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="userId" name="userId" class="inputbox" onchange="selected();">
<option value="0">Not a site user</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numusers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['member']['userId'] == $this->_tpl_vars['user'][$this->_sections['users']['index']]['id']): ?>selected="selected"<?php endif; ?>><?php if ($this->_tpl_vars['user'][$this->_sections['users']['index']]['selected']): ?>In Use - <?php endif; ?><?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['lastname']; ?>
, <?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['firstname']; ?>
 (<?php echo $this->_tpl_vars['user'][$this->_sections['users']['index']]['uname']; ?>
)</option>
<?php endfor; endif; ?>
</select><div id="selected" style="display:none;"></div></div></div><br />

<div id="memberDiv" <?php if ($this->_tpl_vars['member']['type'] != 0): ?>style="display:none;"<?php else: ?>style="display:block;"<?php endif; ?>>
<div class="fieldItem"><label for="fatherId" class="label">Father<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="fatherId" name="fatherId" class="inputbox" onchange="fathercopy();">
<option value="0">Not in system</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numfathers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['fathers'][$this->_sections['users']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['member']['fatherId'] == $this->_tpl_vars['fathers'][$this->_sections['users']['index']]['id']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['fathers'][$this->_sections['users']['index']]['lastName']; ?>
, <?php echo $this->_tpl_vars['fathers'][$this->_sections['users']['index']]['firstName']; ?>
</option>
<?php endfor; endif; ?>
</select></div></div><br />
<div id="copyfather" <?php if ($this->_tpl_vars['member']['fatherId']): ?>style="display:block;"<?php else: ?>style="display:none;"<?php endif; ?>>
<div class="fieldItem"><span class="label">Copy from father<span class="hintanchor" title="Optional :: Select information that should be copied from the fathers details. This will overwrite any existing information."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></span>
<div class="inputboxwrapper">
<input type="checkbox" name="copy[father][home]" id="copyfatherhome" value="1" onchange="toggle('copymotherhome', 'copyfatherhome');"><label for="copyfatherhome">Home Number</label>
<input type="checkbox" name="copy[father][cell]" id="copyfathercell" value="1" onchange="toggle('copymothercell', 'copyfathercell');"><label for="copyfathercell">Cellphone Number</label><br />
<input type="checkbox" name="copy[father][work]" id="copyfatherwork" value="1" onchange="toggle('copymotherwork', 'copyfatherwork');"><label for="copyfatherwork">Work Number</label>
<input type="checkbox" name="copy[father][email]" id="copyfatheremail" value="1" onchange="toggle('copymotheremail', 'copyfatheremail');"><label for="copyfatheremail">Email Address</label><br />
<input type="checkbox" name="copy[father][medical]" id="copyfathermedical" value="1" onchange="toggle('copymothermedical', 'copyfathermedical');"><label for="copyfathermedical">Medical Details</label>
</div></div><br />
</div>

<div class="fieldItem"><label for="motherId" class="label">Mother<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="motherId" name="motherId" class="inputbox"  onchange="mothercopy();">
<option value="0">Not in system</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['nummothers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['mother'][$this->_sections['users']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['member']['motherId'] == $this->_tpl_vars['mother'][$this->_sections['users']['index']]['id']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['mother'][$this->_sections['users']['index']]['lastName']; ?>
, <?php echo $this->_tpl_vars['mother'][$this->_sections['users']['index']]['firstName']; ?>
</option>
<?php endfor; endif; ?>
</select></div></div><br />
<div id="copymother" <?php if ($this->_tpl_vars['member']['motherId']): ?>style="display:block;"<?php else: ?>style="display:none;"<?php endif; ?>>
<div class="fieldItem"><span class="label">Copy from mother<span class="hintanchor" title="Optional :: Select information that should be copied from the mother details. This will overwrite any existing information."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></span>
<div class="inputboxwrapper">
<input type="checkbox" name="copy[mother][home]" id="copymotherhome" value="1" onchange="toggle('copyfatherhome', 'copymotherhome');"><label for="copymotherhome">Home Number</label>
<input type="checkbox" name="copy[mother][cell]" id="copymothercell" value="1" onchange="toggle('copyfathercell', 'copymothercell');"><label for="copymothercell">Cellphone Number</label><br />
<input type="checkbox" name="copy[mother][work]" id="copymotherwork" value="1" onchange="toggle('copyfatherwork', 'copymotherwork');"><label for="copymotherwork">Work Number</label>
<input type="checkbox" name="copy[mother][email]" id="copymotheremail" value="1" onchange="toggle('copyfatheremail', 'copymotheremail');"><label for="copymotheremail">Email Address</label><br />
<input type="checkbox" name="copy[mother][medical]" id="copymothermedical" value="1" onchange="toggle('copyfathermedical', 'copymothermedical');"><label for="copymothermedical">Medical Details</label>
</div></div><br />
</div>

<div class="fieldItem"><label for="primaryGuard" class="label">Primary Guardian<span class="hintanchor" title="Optional :: Only enter information for minors."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="primaryGuard" name="primaryGuard" class="inputbox">
<option value="0" <?php if ($this->_tpl_vars['member']['primaryGuard'] == 0): ?>selected="selected"<?php endif; ?>>Father</option>
<option value="1" <?php if ($this->_tpl_vars['member']['primaryGuard'] == 1): ?>selected="selected"<?php endif; ?>>Mother</option>
</select></div></div><br /></div>
</fieldset>

<?php if ($this->_tpl_vars['numfields'] > 0): ?>
<fieldset>
<legend>Additional Information</legend>
    <?php unset($this->_sections['fields']);
$this->_sections['fields']['name'] = 'fields';
$this->_sections['fields']['loop'] = is_array($_loop=$this->_tpl_vars['numfields']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['fields']['show'] = true;
$this->_sections['fields']['max'] = $this->_sections['fields']['loop'];
$this->_sections['fields']['step'] = 1;
$this->_sections['fields']['start'] = $this->_sections['fields']['step'] > 0 ? 0 : $this->_sections['fields']['loop']-1;
if ($this->_sections['fields']['show']) {
    $this->_sections['fields']['total'] = $this->_sections['fields']['loop'];
    if ($this->_sections['fields']['total'] == 0)
        $this->_sections['fields']['show'] = false;
} else
    $this->_sections['fields']['total'] = 0;
if ($this->_sections['fields']['show']):

            for ($this->_sections['fields']['index'] = $this->_sections['fields']['start'], $this->_sections['fields']['iteration'] = 1;
                 $this->_sections['fields']['iteration'] <= $this->_sections['fields']['total'];
                 $this->_sections['fields']['index'] += $this->_sections['fields']['step'], $this->_sections['fields']['iteration']++):
$this->_sections['fields']['rownum'] = $this->_sections['fields']['iteration'];
$this->_sections['fields']['index_prev'] = $this->_sections['fields']['index'] - $this->_sections['fields']['step'];
$this->_sections['fields']['index_next'] = $this->_sections['fields']['index'] + $this->_sections['fields']['step'];
$this->_sections['fields']['first']      = ($this->_sections['fields']['iteration'] == 1);
$this->_sections['fields']['last']       = ($this->_sections['fields']['iteration'] == $this->_sections['fields']['total']);
?>
        <div class="fieldItem"><<?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] != 3 && $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] != 4): ?>label for="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
"<?php else: ?>span<?php endif; ?> class="label"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['query']; ?>
<span class="hintanchor" title="<?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?>Required<?php else: ?>Optional<?php endif; ?>::<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['hint']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></<?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] != 3 && $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] != 4): ?>label<?php else: ?>span<?php endif; ?>>
        <?php $this->assign('name', $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']); ?>
        <div class="inputboxwrapper">
        <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 1): ?>
            <input name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" type="text" size="<?php echo smarty_function_math(array('equation' => "x + y",'x' => $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'],'y' => 5), $this);?>
" maxlength="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options']; ?>
" value="<?php echo $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]; ?>
" class="inputbox" />
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 2): ?>
            <textarea name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" cols="50" rows="5"  class="inputbox"><?php echo $this->_tpl_vars['details']['custom'][$this->_tpl_vars['name']]; ?>
</textarea>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 3): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <input type="radio" name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
" value="<?php echo $this->_sections['options']['iteration']; ?>
" <?php if ($this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?>checked="checked"<?php endif; ?> /><label for="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
</label>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 4): ?>
            <?php $this->assign('temp', $this->_tpl_vars['details']['custom'][$this->_tpl_vars['name']]); ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <input type="checkbox" name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
" value="1" <?php if ($this->_tpl_vars['temp'][$this->_sections['options']['index']] == 1): ?>checked="checked"<?php endif; ?> /><label for="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
</label>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 5): ?>
            <select name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" class="inputbox">
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <option value="<?php echo $this->_sections['options']['iteration']; ?>
" <?php if ($this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
</option>
            <?php endfor; endif; ?>
            </select>  
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 6): ?>
            <input name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" type="text" value="<?php echo $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]; ?>
" class="inputbox format-y-m-d highlight-days-67" />           
        <?php endif; ?>   
        </div></div><br />
    <?php endfor; endif; ?>         
</fieldset>
<?php endif; ?>

<div id="scoutinginfo" <?php if ($this->_tpl_vars['member']['type'] != 0): ?>style="display:none;"<?php else: ?>style="display:block;"<?php endif; ?>>
<fieldset>
<legend>Scouting Information</legend>
<div class="fieldItem"><label for="section" class="label">Section<span class="hintanchor" title="Required :: Which section does this <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
 belong to"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="section" name="section" class="inputbox" />
<option value="0">None</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numsections']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['sections'][$this->_sections['users']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['member']['section'] == $this->_tpl_vars['sections'][$this->_sections['users']['index']]['id']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['sections'][$this->_sections['users']['index']]['name']; ?>
</option>
<?php endfor; endif; ?>
</select></div></div><br />

<div class="fieldItem"><label for="patrol" class="label"><?php echo $this->_tpl_vars['scoutlang']['patrol']; ?>
<span class="hintanchor" title="Required :: Which <?php echo $this->_tpl_vars['scoutlang']['patrol']; ?>
 does this <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
 belong too?"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="patrol" name="patrol" class="inputbox" />
<option value="0">None</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numpatrols']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['patrol'][$this->_sections['users']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['member']['patrol'] == $this->_tpl_vars['patrol'][$this->_sections['users']['index']]['id']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['patrol'][$this->_sections['users']['index']]['teamname']; ?>
</option>
<?php endfor; endif; ?>
</select></div></div><br />
<div class="fieldItem"><label for="awardScheme" class="label"><?php echo $this->_tpl_vars['scoutlang']['award_scheme']; ?>
<span class="hintanchor" title="Required :: Which <?php echo $this->_tpl_vars['scoutlang']['award_scheme']; ?>
 does this <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
 follow?"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select id="awardScheme" name="awardScheme" class="inputbox" />
<option value="0">None</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numschemes']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['schemes'][$this->_sections['users']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['member']['awardScheme'] == $this->_tpl_vars['schemes'][$this->_sections['users']['index']]['id']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['schemes'][$this->_sections['users']['index']]['name']; ?>
</option>
<?php endfor; endif; ?>
</select></div></div><br />
<?php if ($this->_tpl_vars['numscoutfields'] > 0): ?>
<fieldset>
<legend>Additional Scouting Information</legend>
    <?php unset($this->_sections['scoutfields']);
$this->_sections['scoutfields']['name'] = 'scoutfields';
$this->_sections['scoutfields']['loop'] = is_array($_loop=$this->_tpl_vars['numscoutfields']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['scoutfields']['show'] = true;
$this->_sections['scoutfields']['max'] = $this->_sections['scoutfields']['loop'];
$this->_sections['scoutfields']['step'] = 1;
$this->_sections['scoutfields']['start'] = $this->_sections['scoutfields']['step'] > 0 ? 0 : $this->_sections['scoutfields']['loop']-1;
if ($this->_sections['scoutfields']['show']) {
    $this->_sections['scoutfields']['total'] = $this->_sections['scoutfields']['loop'];
    if ($this->_sections['scoutfields']['total'] == 0)
        $this->_sections['scoutfields']['show'] = false;
} else
    $this->_sections['scoutfields']['total'] = 0;
if ($this->_sections['scoutfields']['show']):

            for ($this->_sections['scoutfields']['index'] = $this->_sections['scoutfields']['start'], $this->_sections['scoutfields']['iteration'] = 1;
                 $this->_sections['scoutfields']['iteration'] <= $this->_sections['scoutfields']['total'];
                 $this->_sections['scoutfields']['index'] += $this->_sections['scoutfields']['step'], $this->_sections['scoutfields']['iteration']++):
$this->_sections['scoutfields']['rownum'] = $this->_sections['scoutfields']['iteration'];
$this->_sections['scoutfields']['index_prev'] = $this->_sections['scoutfields']['index'] - $this->_sections['scoutfields']['step'];
$this->_sections['scoutfields']['index_next'] = $this->_sections['scoutfields']['index'] + $this->_sections['scoutfields']['step'];
$this->_sections['scoutfields']['first']      = ($this->_sections['scoutfields']['iteration'] == 1);
$this->_sections['scoutfields']['last']       = ($this->_sections['scoutfields']['iteration'] == $this->_sections['scoutfields']['total']);
?>
        <div class="fieldItem"><<?php if ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] != 3 && $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] != 4): ?>label for="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
"<?php else: ?>span<?php endif; ?> class="label"><?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['query']; ?>
<span class="hintanchor" title="<?php if ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['required']): ?>Required<?php else: ?>Optional<?php endif; ?>::<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['hint']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></<?php if ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] != 3 && $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] != 4): ?>label<?php else: ?>span<?php endif; ?>>
        <?php $this->assign('name', $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']); ?>
        <div class="inputboxwrapper">
        <?php if ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] == 1): ?>
            <input name="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
" type="text" size="<?php echo smarty_function_math(array('equation' => "x + y",'x' => $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options'],'y' => 5), $this);?>
" maxlength="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options']; ?>
" value="<?php echo $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]; ?>
" class="inputbox" />
        <?php elseif ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] == 2): ?>
            <textarea name="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
" cols="50" rows="5"  class="inputbox"><?php echo $this->_tpl_vars['details']['custom'][$this->_tpl_vars['name']]; ?>
</textarea>
        <?php elseif ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] == 3): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <input type="radio" name="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
" id="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
" value="<?php echo $this->_sections['options']['iteration']; ?>
" <?php if ($this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?>checked="checked"<?php endif; ?> /><label for="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
"><?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options'][$this->_sections['options']['index']]; ?>
</label>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] == 4): ?>
            <?php $this->assign('temp', $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]); ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <input type="checkbox" name="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
" id="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
" value="1" <?php if ($this->_tpl_vars['temp'][$this->_sections['options']['index']] == 1): ?>checked="checked"<?php endif; ?> /><label for="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
"><?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options'][$this->_sections['options']['index']]; ?>
</label>&nbsp;
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] == 5): ?>
            <select name="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
" class="inputbox">
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <option value="<?php echo $this->_sections['options']['iteration']; ?>
" <?php if ($this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['options'][$this->_sections['options']['index']]; ?>
</option>
            <?php endfor; endif; ?>
            </select>  
        <?php elseif ($this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['type'] == 6): ?>
            <input name="<?php echo $this->_tpl_vars['scoutfields'][$this->_sections['scoutfields']['index']]['name']; ?>
" type="text" value="<?php echo $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]; ?>
" class="inputbox format-y-m-d highlight-days-67" />           
        <?php endif; ?>   
        </div></div><br />
    <?php endfor; endif; ?>          
</fieldset>
<?php endif; ?>
</fieldset>
</div>
</div>
<div class="submitWrapper"><input type="submit" name="submit" value="Submit" class="button" />&nbsp;<input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="window.location='admin.php?page=troop';" class="button" /></div>

</form>
</div></div>
<?php elseif ($this->_tpl_vars['action'] == 'view'): ?>
<h2>View <?php echo $this->_tpl_vars['scoutlang']['member']; ?>
</h2>
<div align="center"><div class="formlist">
<div class="field">
<fieldset>
<legend>Details</legend>
<div class="fieldItem"><label for="firstname" class="label">First Name</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['firstName']; ?>
</div></div><br />

<div class="fieldItem"><label for="middlename" class="label">Middle Name</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['middleName']; ?>
</div></div><br />

<div class="fieldItem"><label for="lastname" class="label">Last Name</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['lastName']; ?>
</div></div><br />

<div class="fieldItem"><label for="sex" class="label">Gender</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['sex'] == 0): ?>Male<?php else: ?>Female<?php endif; ?></div></div><br />

<div class="fieldItem"><label for="address" class="label">Address</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['address']; ?>
</div></div><br />

<div class="fieldItem"><label for="homenumber" class="label">Home Number</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['home']; ?>
</div></div><br />

<div class="fieldItem"><label for="cellnumber" class="label">Cell Number</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['cell']; ?>
</div></div><br />

<div class="fieldItem"><label for="worknumber" class="label">Work Number</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['work']; ?>
</div></div><br />

<div class="fieldItem"><label for="email" class="label">Email Address</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['email']; ?>
</div></div><br />
</fieldset>

<fieldset>
<legend>Medical Details</legend>
<div class="fieldItem"><label for="medicalname" class="label">Medical Aid Name</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['aidName']; ?>
</div></div><br />

<div class="fieldItem"><label for="medicalnumber" class="label">Medical Aid Number</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['aidNumber']; ?>
</div></div><br />

<div class="fieldItem"><label for="docname" class="label">Doctor's Name</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['docName']; ?>
</div></div><br />

<div class="fieldItem"><label for="docnum" class="label">Doctor Tel Number</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['docNumber']; ?>
</div></div><br />

<div class="fieldItem"><label for="medical" class="label">Medical Conditions</label>
<div class="inputboxwrapper"><?php echo $this->_tpl_vars['member']['medicalDetails']; ?>
</div></div><br />
</fieldset>

<fieldset>
<legend>Other Information</legend>
<div class="fieldItem"><label for="type" class="label">Record Type</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['type'] == 0): ?><?php echo $this->_tpl_vars['scoutlang']['member']; ?>
<?php elseif ($this->_tpl_vars['member']['type'] == 1): ?>Father<?php elseif ($this->_tpl_vars['member']['type'] == 2): ?>Mother<?php elseif ($this->_tpl_vars['member']['type'] == 3): ?>Legal Guardian<?php endif; ?>
</div></div><br />

<div class="fieldItem"><label for="userId" class="label">Website Username</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['userId']): ?><?php echo $this->_tpl_vars['member']['user']['lastname']; ?>
, <?php echo $this->_tpl_vars['member']['user']['firstname']; ?>
 (<?php echo $this->_tpl_vars['member']['user']['uname']; ?>
)<?php else: ?><?php echo $this->_tpl_vars['scoutlang']['member']; ?>
 not registered on site.<?php endif; ?></div></div><br />
<?php if ($this->_tpl_vars['member']['type'] == 0): ?>
<div class="fieldItem"><label for="fatherId" class="label">Father</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['fatherId']): ?><?php echo $this->_tpl_vars['member']['father']['lastname']; ?>
, <?php echo $this->_tpl_vars['member']['father']['firstname']; ?>
<?php else: ?>Not in system.<?php endif; ?></div></div><br />
<?php if ($this->_tpl_vars['member']['fatherId']): ?><div class="fieldItem">
<div class="inputboxwrapper" style="width:100%;"><table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="table">
<thead>
<tr> 
  <th width="25%" class="smallhead">Home</th>
  <th width="25%" class="smallhead">Cell</th>
  <th width="25%" class="smallhead">Work</th>
  <th width="25%" class="smallhead">Email</th>
</tr>
</thead>
<tbody>
<tr class="text">
  <td class="text"><?php echo $this->_tpl_vars['member']['father']['home']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['member']['father']['cell']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['member']['father']['work']; ?>
</td>
  <td class="text"><a href="mailto:<?php echo $this->_tpl_vars['member']['father']['email']; ?>
"><?php echo $this->_tpl_vars['member']['father']['email']; ?>
</a></td>
</tr>
</tbody>
</table></div></div><br /><?php endif; ?>

<div class="fieldItem"><label for="motherId" class="label">Mother</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['motherId']): ?><?php echo $this->_tpl_vars['member']['mother']['lastname']; ?>
, <?php echo $this->_tpl_vars['member']['mother']['firstname']; ?>
<?php else: ?>Not in system.<?php endif; ?></div></div><br />
<?php if ($this->_tpl_vars['member']['motherId']): ?><div class="fieldItem">
<div class="inputboxwrapper" style="width:100%;"><table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="table">
<thead>
<tr> 
  <th width="25%" class="smallhead">Home</th>
  <th width="25%" class="smallhead">Cell</th>
  <th width="25%" class="smallhead">Work</th>
  <th width="25%" class="smallhead">Email</th>
</tr>
</thead>
<tbody>
<tr class="text">
  <td class="text"><?php echo $this->_tpl_vars['member']['mother']['home']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['member']['mother']['cell']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['member']['mother']['work']; ?>
</td>
  <td class="text"><a href="mailto:<?php echo $this->_tpl_vars['member']['mother']['email']; ?>
"><?php echo $this->_tpl_vars['member']['mother']['email']; ?>
</a></td>
</tr>
</tbody>
</table></div></div><br /><?php endif; ?>

<div class="fieldItem"><label for="primaryGuard" class="label">Primary Guardian</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['primaryGuard'] == 0): ?>Father<?php else: ?>Mother<?php endif; ?></div></div><br />
<?php endif; ?>
</fieldset>

<?php if ($this->_tpl_vars['member']['type'] == 0): ?>
<fieldset>
<legend>Scouting</legend>
<div class="fieldItem"><label for="section" class="label">Section</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['section']): ?><?php echo $this->_tpl_vars['member']['section']['name']; ?>
<?php else: ?>None<?php endif; ?></div></div><br />

<div class="fieldItem"><label for="patrol" class="label"><?php echo $this->_tpl_vars['scoutlang']['patrol']; ?>
</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['patrol']): ?><?php echo $this->_tpl_vars['member']['patrolname']['teamname']; ?>
<?php else: ?>None<?php endif; ?></div></div><br />

<div class="fieldItem"><label for="awardScheme" class="label"><?php echo $this->_tpl_vars['scoutlang']['award_scheme']; ?>
</label>
<div class="inputboxwrapper"><?php if ($this->_tpl_vars['member']['awardScheme']): ?><?php echo $this->_tpl_vars['member']['awardScheme']['name']; ?>
<?php else: ?>None<?php endif; ?></div></div><br />
</fieldset>
<?php endif; ?>

<?php if ($this->_tpl_vars['numfields'] > 0): ?>
<fieldset>
<legend>Additional Information</legend>
    <?php unset($this->_sections['fields']);
$this->_sections['fields']['name'] = 'fields';
$this->_sections['fields']['loop'] = is_array($_loop=$this->_tpl_vars['numfields']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['fields']['show'] = true;
$this->_sections['fields']['max'] = $this->_sections['fields']['loop'];
$this->_sections['fields']['step'] = 1;
$this->_sections['fields']['start'] = $this->_sections['fields']['step'] > 0 ? 0 : $this->_sections['fields']['loop']-1;
if ($this->_sections['fields']['show']) {
    $this->_sections['fields']['total'] = $this->_sections['fields']['loop'];
    if ($this->_sections['fields']['total'] == 0)
        $this->_sections['fields']['show'] = false;
} else
    $this->_sections['fields']['total'] = 0;
if ($this->_sections['fields']['show']):

            for ($this->_sections['fields']['index'] = $this->_sections['fields']['start'], $this->_sections['fields']['iteration'] = 1;
                 $this->_sections['fields']['iteration'] <= $this->_sections['fields']['total'];
                 $this->_sections['fields']['index'] += $this->_sections['fields']['step'], $this->_sections['fields']['iteration']++):
$this->_sections['fields']['rownum'] = $this->_sections['fields']['iteration'];
$this->_sections['fields']['index_prev'] = $this->_sections['fields']['index'] - $this->_sections['fields']['step'];
$this->_sections['fields']['index_next'] = $this->_sections['fields']['index'] + $this->_sections['fields']['step'];
$this->_sections['fields']['first']      = ($this->_sections['fields']['iteration'] == 1);
$this->_sections['fields']['last']       = ($this->_sections['fields']['iteration'] == $this->_sections['fields']['total']);
?>
        <div class="fieldItem"><label for="$fields[fields].name" class="label"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['query']; ?>
</label>
        <?php $this->assign('name', $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']); ?>
        <div class="inputboxwrapper">
        <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 1): ?>
            <?php echo $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]; ?>

        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 2): ?>
            <?php echo $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]; ?>

        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 3): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
                <?php if ($this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
<?php endif; ?>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 4): ?>
            <?php $this->assign('temp', $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]); ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
                <?php if ($this->_tpl_vars['temp'][$this->_sections['options']['index']] == 1): ?><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
<?php endif; ?><?php if ($this->_sections['options']['iteration'] < ( $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0] )): ?>, <?php endif; ?>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 5): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
                <?php if ($this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
<?php endif; ?>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 6): ?>
            <?php echo $this->_tpl_vars['member']['custom'][$this->_tpl_vars['name']]; ?>
           
        <?php endif; ?>   
        </div></div><br />
    <?php endfor; endif; ?>          
</fieldset>
<?php endif; ?>
</div>
<a href="<?php echo $this->_tpl_vars['pagename']; ?>
">Back</a>
</div></div>
<?php endif; ?>